



<!doctype html>
<html lang="en" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      <meta http-equiv="x-ua-compatible" content="ie=edge">
      
        <meta name="description" content="Exploring the stateless client and how this implementation of data processing and storing could greatly reduce the workload on the Ethereum blockchain, improving performance and scalability.">
      
      
      
      
        <meta name="lang:clipboard.copy" content="Copy to clipboard">
      
        <meta name="lang:clipboard.copied" content="Copied to clipboard">
      
        <meta name="lang:search.language" content="en">
      
        <meta name="lang:search.pipeline.stopwords" content="True">
      
        <meta name="lang:search.pipeline.trimmer" content="True">
      
        <meta name="lang:search.result.none" content="No matching documents">
      
        <meta name="lang:search.result.one" content="1 matching document">
      
        <meta name="lang:search.result.other" content="# matching documents">
      
        <meta name="lang:search.tokenizer" content="[\s\-]+">
      
      <link rel="shortcut icon" href="../../../assets/images/favicon.ico">
      <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-3.3.0">
    
    
      
        <title>Stateless-Clients - Ethhub</title>
      
    
    
      <link rel="stylesheet" href="../../../assets/stylesheets/application.63c76b3b.css">
      
        <link rel="stylesheet" href="../../../assets/stylesheets/application-palette.4637f1a4.css">
      
      
        
        
        <meta name="theme-color" content="">
      
    
    
      <script src="../../../assets/javascripts/modernizr.962652e9.js"></script>
    
    
      
        <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
        <style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
      
    
    <link rel="stylesheet" href="../../../assets/fonts/material-icons.css">
    
    
      <link rel="stylesheet" href="../../../extra.css">
    
    
      
        <script async src="https://www.googletagmanager.com/gtag/js?id=UA-125892125-2"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-125892125-2")</script>
      
    
    
  </head>
  
    
    
    <body dir="ltr" data-md-color-primary="ethhub" data-md-color-accent="">
  
    <svg class="md-svg">
      <defs>
        
        
          <svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
    viewBox="0 0 416 448" id="__github">
  <path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
        8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
        18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
        19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
        18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
        304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
        2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
        38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
        37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
        82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
        1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
        0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
        30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
        46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
        99.5z" />
</svg>
        
      </defs>
    </svg>
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
    
      <a href="#stateless-clients" tabindex="1" class="md-skip">
        Skip to content
      </a>
    
    
      <header class="md-header" data-md-component="header">
  <nav class="md-header-nav md-grid">
    <div class="md-flex">
      <div class="md-flex__cell md-flex__cell--shrink">
        <a href="../../.." title="EthHub" class="md-header-nav__button md-logo">
          
            <img src="../../../logo.png" width="24" height="24">
          
        </a>
      </div>
      <div class="md-flex__cell md-flex__cell--shrink">
        <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
      </div>
      <div class="md-flex__cell md-flex__cell--stretch">
        <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
          
            
              <span class="md-header-nav__topic">
                EthHub
              </span>
              <span class="md-header-nav__topic">
                Stateless-Clients - Ethhub
              </span>
            
          
        </div>
      </div>
      <div class="md-flex__cell md-flex__cell--shrink">
        
          
            <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
            
<div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
      <label class="md-icon md-search__icon" for="__search"></label>
      <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
        &#xE5CD;
      </button>
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" data-md-scrollfix>
        <div class="md-search-result" data-md-component="result">
          <div class="md-search-result__meta">
            Type to start searching
          </div>
          <ol class="md-search-result__list"></ol>
        </div>
      </div>
    </div>
  </div>
</div>
          
        
      </div>
      
        <div class="md-flex__cell md-flex__cell--shrink">
          <div class="md-header-nav__source">
            


  


  <a href="https://github.com/ethhub-io/ethhub-zh/" title="Go to repository" class="md-source" data-md-source="github">
    
      <div class="md-source__icon">
        <svg viewBox="0 0 24 24" width="24" height="24">
          <use xlink:href="#__github" width="24" height="24"></use>
        </svg>
      </div>
    
    <div class="md-source__repository">
      ethhub-io/ethhub-zh
    </div>
  </a>

          </div>
        </div>
      
    </div>
  </nav>
</header>
    
    <div class="md-container">
      
        
      
      
        

<nav class="md-tabs" data-md-component="tabs">
  <div class="md-tabs__inner md-grid">
    <ul class="md-tabs__list">
      
        
  <li class="md-tabs__item">
    
      <a href="../../.." title="首页" class="md-tabs__link md-tabs__link--active">
        首页
      </a>
    
  </li>

      
        
      
        
      
        
      
        
      
        
  
  
    <li class="md-tabs__item">
      
        <a href="../../../ethereum-basics/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E6%98%AF%E4%BB%80%E4%B9%88/" title="以太坊基础" class="md-tabs__link">
          以太坊基础
        </a>
      
    </li>
  

      
        
  
  
    
    
  
  
    <li class="md-tabs__item">
      
        <a href="../%E4%BB%A5%E5%A4%AA%E5%9D%8A2.0%E5%90%84%E9%98%B6%E6%AE%B5/" title="以太坊路线图" class="md-tabs__link">
          以太坊路线图
        </a>
      
    </li>
  

  

      
        
  
  
    <li class="md-tabs__item">
      
        <a href="../../../using-ethereum/%E5%A6%82%E4%BD%95%E8%B4%AD%E4%B9%B0ETH/" title="使用以太坊" class="md-tabs__link">
          使用以太坊
        </a>
      
    </li>
  

      
    </ul>
  </div>
</nav>
      
      <main class="md-main">
        <div class="md-main__inner md-grid" data-md-component="container">
          
            
              <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    <nav class="md-nav md-nav--primary" data-md-level="0">
  <label class="md-nav__title md-nav__title--site" for="__drawer">
    <a href="../../.." title="EthHub" class="md-nav__button md-logo">
      
        <img src="../../../logo.png" width="48" height="48">
      
    </a>
    EthHub
  </label>
  
    <div class="md-nav__source">
      


  


  <a href="https://github.com/ethhub-io/ethhub-zh/" title="Go to repository" class="md-source" data-md-source="github">
    
      <div class="md-source__icon">
        <svg viewBox="0 0 24 24" width="24" height="24">
          <use xlink:href="#__github" width="24" height="24"></use>
        </svg>
      </div>
    
    <div class="md-source__repository">
      ethhub-io/ethhub-zh
    </div>
  </a>

    </div>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
      


  <li class="md-nav__item">
    <a href="../../.." title="首页" class="md-nav__link">
      首页
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="../../../ethereum-basics/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E6%98%AF%E4%BB%80%E4%B9%88/" title="文档" class="md-nav__link">
      文档
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="https://podcast.ethhub.io" title="播客" class="md-nav__link">
      播客
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="https://ethhub.substack.com/" title="新闻" class="md-nav__link">
      新闻
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="https://shop.ethhub.io" title="商城" class="md-nav__link">
      商城
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">
    
    <label class="md-nav__link" for="nav-6">
      以太坊基础
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
      <label class="md-nav__title" for="nav-6">
        以太坊基础
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../../../ethereum-basics/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E6%98%AF%E4%BB%80%E4%B9%88/" title="以太坊是什么？" class="md-nav__link">
      以太坊是什么？
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../../ethereum-basics/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E8%B4%A7%E5%B8%81%E6%94%BF%E7%AD%96/" title="以太坊货币政策" class="md-nav__link">
      以太坊货币政策
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

    
      
      
      


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7">
    
    <label class="md-nav__link" for="nav-7">
      以太坊路线图
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
      <label class="md-nav__title" for="nav-7">
        以太坊路线图
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7-1" type="checkbox" id="nav-7-1">
    
    <label class="md-nav__link" for="nav-7-1">
      以太坊 2.0
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-7-1">
        以太坊 2.0
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../%E4%BB%A5%E5%A4%AA%E5%9D%8A2.0%E5%90%84%E9%98%B6%E6%AE%B5/" title="以太坊2.0各阶段" class="md-nav__link">
      以太坊2.0各阶段
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../%E4%BB%A5%E5%A4%AA%E5%9D%8A%E6%9D%83%E7%9B%8A%E8%AF%81%E6%98%8E/" title="以太坊权益证明" class="md-nav__link">
      以太坊权益证明
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../%E4%BB%A5%E5%A4%AA%E5%9D%8A%E4%B8%AD%E7%9A%84%E5%88%86%E7%89%87/" title="以太坊中的分片" class="md-nav__link">
      以太坊中的分片
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../%E4%BB%A5%E5%A4%AA%E5%9D%8A2.0%E7%BB%8F%E6%B5%8E%E5%AD%A6/" title="以太坊2.0经济学" class="md-nav__link">
      以太坊2.0经济学
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../%E4%BB%8E%E4%BB%A5%E5%A4%AA%E5%9D%8A1.0%E8%BF%81%E7%A7%BB%E5%88%B0%E4%BB%A5%E5%A4%AA%E5%9D%8A2.0/" title="从以太坊1.0迁移到以太坊2.0" class="md-nav__link">
      从以太坊1.0迁移到以太坊2.0
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../%E4%BB%A5%E5%A4%AA%E5%9D%8A1.x/" title="以太坊1.x" class="md-nav__link">
      以太坊1.x
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7-3" type="checkbox" id="nav-7-3">
    
    <label class="md-nav__link" for="nav-7-3">
      Layer 2 扩容方案
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-7-3">
        Layer 2 扩容方案
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../../layer-2-scaling/zk-rollups/" title="ZK-Rollups" class="md-nav__link">
      ZK-Rollups
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../layer-2-scaling/optimistic_rollups/" title="Optimistic Rollups" class="md-nav__link">
      Optimistic Rollups
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

        
      </ul>
    </nav>
  </li>

    
      
      
      


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8">
    
    <label class="md-nav__link" for="nav-8">
      使用以太坊
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
      <label class="md-nav__title" for="nav-8">
        使用以太坊
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../../../using-ethereum/%E5%A6%82%E4%BD%95%E8%B4%AD%E4%B9%B0ETH/" title="如何购买ETH" class="md-nav__link">
      如何购买ETH
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../../using-ethereum/%E8%BF%90%E8%A1%8C%E4%BB%A5%E5%A4%AA%E5%9D%8A%E8%8A%82%E7%82%B9/" title="运行以太坊节点" class="md-nav__link">
      运行以太坊节点
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-8-3" type="checkbox" id="nav-8-3">
    
    <label class="md-nav__link" for="nav-8-3">
      钱包
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-8-3">
        钱包
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../../../using-ethereum/wallets/%E4%BB%8B%E7%BB%8D%E4%BB%A5%E5%A4%AA%E5%9D%8A%E9%92%B1%E5%8C%85/" title="介绍以太坊钱包" class="md-nav__link">
      介绍以太坊钱包
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../../using-ethereum/wallets/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E6%99%BA%E8%83%BD%E5%90%88%E7%BA%A6%E9%92%B1%E5%8C%85/" title="以太坊智能合约钱包" class="md-nav__link">
      以太坊智能合约钱包
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../../using-ethereum/wallets/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%A1%AC%E4%BB%B6%E9%92%B1%E5%8C%85/" title="以太坊硬件钱包" class="md-nav__link">
      以太坊硬件钱包
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../../using-ethereum/wallets/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%A7%BB%E5%8A%A8%E9%92%B1%E5%8C%85/" title="以太坊移动钱包" class="md-nav__link">
      以太坊移动钱包
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../../using-ethereum/wallets/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E6%A1%8C%E9%9D%A2%E9%92%B1%E5%8C%85/" title="以太坊桌面钱包" class="md-nav__link">
      以太坊桌面钱包
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../../using-ethereum/wallets/web.md" title="以太坊网页钱包" class="md-nav__link">
      以太坊网页钱包
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

        
      </ul>
    </nav>
  </li>

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    
<nav class="md-nav md-nav--secondary">
  
  
    
  
  
    <label class="md-nav__title" for="__toc">Table of contents</label>
    <ul class="md-nav__list" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#introduction" title="Introduction" class="md-nav__link">
    Introduction
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#what-does-state-mean" title="What does state mean?" class="md-nav__link">
    What does state mean?
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#state-defining-objects" title="State-defining Objects" class="md-nav__link">
    State-defining Objects
  </a>
  
    <nav class="md-nav">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#account-state" title="Account State" class="md-nav__link">
    Account State
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#world-state" title="World State" class="md-nav__link">
    World State
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#ethereum-stateless-client" title="Ethereum Stateless Client" class="md-nav__link">
    Ethereum Stateless Client
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#applications-of-stateless-clients-in-ethereum" title="Applications of Stateless Clients in Ethereum" class="md-nav__link">
    Applications of Stateless Clients in Ethereum
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#additional-benefits-of-stateless-clients" title="Additional Benefits of Stateless Clients" class="md-nav__link">
    Additional Benefits of Stateless Clients
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#security-considerations" title="Security Considerations" class="md-nav__link">
    Security Considerations
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#resources" title="Resources" class="md-nav__link">
    Resources
  </a>
  
</li>
      
      
      
      
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          <div class="md-content">
            <article class="md-content__inner md-typeset">
              
                
                  <a href="https://github.com/ethhub-io/ethhub-zh/edit/master/docs/ethereum-roadmap/ethereum-2.0/stateless-clients.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
                
                
                <h1 id="stateless-clients">Stateless Clients</h1>
<h2 id="introduction">Introduction</h2>
<p>Ethereum is based on blockchain technology.  A blockchain is defined as a "cryptographically secure transactional singleton machine with shared-state."  </p>
<ul>
<li>
<p>"Cryptographically secure" means that creation and movement of the digital currency is mathematically obscured by extremely complex algorithms nearly impossible to decode.  </p>
</li>
<li>
<p>"Transaction singleton machine" means a single canonical instance of the machine is being created in the system to handle transactions.  This is a singular truth that all participants on the network believe in.  </p>
</li>
<li>
<p>"With shared-state" means that the state of the machine is stored and shared with everyone.</p>
</li>
</ul>
<p>This is an examination of the concept of state in a virtual machine which introduces the concept of a stateless client in Ethereum.</p>
<h2 id="what-does-state-mean">What does state mean?</h2>
<p>State defines the values contained in a block at any given time.  The state of the virtual machine changes after each set of transactions are processed.</p>
<p><img alt="Flow of transactions causing a state change." src="https://miro.medium.com/max/1282/1*jZ-VRXBJtOnePofB0z2Q8A.png" title="State changes" /></p>
<h2 id="state-defining-objects">State-defining Objects</h2>
<h3 id="account-state">Account State</h3>
<p>The global "shared-state" is comprised of many objects called accounts.  Two types of accounts exist, externally owned and contract accounts.  Externally owned accounts are  controlled by private keys and have no code associate with them.  Contract accounts are controlled by their contract code and have code associated with them.</p>
<p>Account state is further broken down into:</p>
<ul>
<li>
<p>nonce: For externally owned accounts this refers to number of transactions sent from the address.  Contract accounts would store the number of contracts created by the account.</p>
</li>
<li>
<p>balance:  The amount of Ether stored on the account.</p>
</li>
<li>
<p>storageRoot: A hash of the root node of a Merkle Patricia tree.  This encodes a hash of storage contents on the account.</p>
</li>
<li>
<p>codeHash: The hash of the EVM (Ethereum Virtual Machine) code of this account.  Contract account code gets hashed and stored here.  Externally owned accounts contain the hash of an empty string.</p>
</li>
</ul>
<h3 id="world-state">World State</h3>
<p>World state is a mapping of account addresses between account states.  This mapping is stored as a Merkle Patricia tree.</p>
<p><img alt="https://miro.medium.com/max/1488/1*N8YtAcAqdtHtzUaZAJgUJQ.png" src="https://miro.medium.com/max/1488/1*N8YtAcAqdtHtzUaZAJgUJQ.png" title="State Tree" /></p>
<p>This same structure is used to store transactions and receipts.  This becomes a large amount of data which needs to be stored and processed if the entire state is stored and traversed when creating new blocks.</p>
<h2 id="ethereum-stateless-client">Ethereum Stateless Client</h2>
<p>The way a block is constructed on Ethereum offers a method to create a sort of stateless client.  It is important to know that as Ethereum evolves, statelessness is ultimately going to be a spectrum.  Some knowledge of data in surrounding nodes will be required in order to create valid hashes.</p>
<p><img alt="Ethereum Block Header" src="https://miro.medium.com/max/1056/1*4EQFjXD2-dbiVgVv-8Si8g.png" title="Ethereum Block Header" /></p>
<p>Statelessness allows the creation of light nodes.  A light node contains only the chain of headers without the execution of any transactions or associated states.</p>
<p>When a node comes online it will be fully stateless since it will hold zero information regarding state.  Over time it will soak up the
state as transactions touch upon it, putting together a more complete state with every change of state presented.  New nodes will be more stateless offering benefits of lower memory usage, disk, and I/O.  Bandwidth usage will be the highest because peers need to send larger
proofs to the new node as it develops its own state data.  More stateful clients will have higher demands on memory, disk, and I/O while
bandwidth requirements would decrease.  Nodes can become more stateful until a certain tradeoff point is reached and then halted from
further acquisition of state information to optimize the trade off in computing power and bandwidth.</p>
<h2 id="applications-of-stateless-clients-in-ethereum">Applications of Stateless Clients in Ethereum</h2>
<p>Ethereum 1.X implements stateless clients but not stateless miners.  Fast sync initializes as a stateless node.<br />
It creates what is called a launch-block and only records the input and output state of this block locally.  The launch block is
a predetermined block number that is a certain amount of time in the future.  The future dated deadline is so that the node can work
on constructing the launch-block.  Witness data is called by the node to construct blocks.  As long as the launch-block is created early
or on time, the creation of blocks will continue and the node is active.  Use of witness data and input/output states only make this a
stateless client.</p>
<p>Ethereum 2.0 implements stateless clients and stateless miners in Sharding.  All nodes are stateless so that faster processing with less data
increases scalability greatly.  Currently the Ethereum blockchain is a sequential chain of blocks where one is
completed on top of another in a linear fashion.  This leads to traffic jams and an overall inefficency in data processing.   Sharding
is a design where the Ethereum network is split into groups referred to a shards.  Each shard has its own independant state.  Transactions
are delegated to different shards for processing, so rather than the entire network processing the same transaction, parallel computing
increases efficiency by allowing the work to be split up and executed concurrently.</p>
<h2 id="additional-benefits-of-stateless-clients">Additional Benefits of Stateless Clients</h2>
<p>Mining new blocks will be moved from proof of work (PoW) to proof of stake (PoS).  A user can become a miner by staking a minimum
amount of Ethereum live on the blockchain.  This allows a miner to vote on the next block to create.  Consensus comes very quickly,
within one block of the evaluated block, because lengthy hash cryptography is no longer used to create blocks. This greatly reduces
electricity requirements, therefore cost of running a node.  Additionally, the held stake is an economic incentive / punishement for
any miner that performs nefarious activity.</p>
<p>Disk I/O becomes less susceptable to DoS attacks, however still remains the best vector for a DoS attack.  Even for state-storing clients, the account lists allow clients to pre-fetch storage data from disk, possibly in parallel, greatly reducing their vulnerability to DoS attacks.</p>
<p>In a sharded blockchain, security is increased by reshuffling clients between shards frequently.  In a state-storing client model, reshuffling involved clients download the full state of the new shard they are being reshuffled to. In a stateless client, this cost drops to zero, allowing clients to be reshuffled between every single block that they create.</p>
<p>Transaction speed and scalablility will also improve.</p>
<h2 id="security-considerations">Security Considerations</h2>
<p>DoS attacks aimed at the disk I/O vector are still the greatest risk for DoS attacks.</p>
<p>Casper is the proof of staking algorithm used in Ethereum 2.0.  The following are a list of theoretical attacks that could be executed
on Casper for further research on your own.
* <a href="https://ethstaking.io/guide-to-ethereum-proof-of-stake-and-casper/casper-weaknesses/">Casper Weaknesses</a>
* <a href="https://ethstaking.io/guide-to-ethereum-proof-of-stake-and-casper/casper-sybil-attack/">Casper Sybil Attack</a>
* <a href="https://ethstaking.io/guide-to-ethereum-proof-of-stake-and-casper/casper-51-attack/">Casper 51% Attack</a>
* <a href="https://ethstaking.io/guide-to-ethereum-proof-of-stake-and-casper/casper-bribe-attack/">Casper Bribe Attack</a>
* <a href="https://ethstaking.io/guide-to-ethereum-proof-of-stake-and-casper/casper-censorship-attack/">Casper Censorship Attack</a>
* <a href="https://ethstaking.io/guide-to-ethereum-proof-of-stake-and-casper/casper-liveness-denial-attack/">Casper Liveness Denial Attack</a>
* <a href="https://ethstaking.io/guide-to-ethereum-proof-of-stake-and-casper/casper-long-range-attack/">Casper Long Range Attack</a></p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://blog.ethereum.org/2019/12/30/eth1x-files-state-of-stateless-ethereum/">The 1.x Files: The State of Stateless Ethereum</a></li>
<li><a href="https://ethresear.ch/t/the-stateless-client-concept/172">The Stateless Client Concept</a></li>
<li><a href="https://medium.com/@akhounov/the-shades-of-statefulness-in-ethereum-nodes-697b0f88cd04">The shades of statefulness (in Ethereum nodes)</a></li>
<li><a href="https://medium.com/@akhounov/data-from-the-ethereum-stateless-prototype-8c69479c8abc">Data from the Ethereum stateless prototype</a></li>
<li><a href="https://education.district0x.io/general-topics/understanding-ethereum/basics-state-channels/">The Basics of State Channels</a></li>
<li><a href="https://education.district0x.io/general-topics/understanding-ethereum/ethereum-sha">Ethereum Sharding Explained</a></li>
<li><a href="https://medium.com/@jason.carver/intro-to-beam-sync-a0fd168be14a">Intro to Beam Sync</a></li>
<li><a href="https://ethstaking.io/guide-to-ethereum-proof-of-stake-and-casper/casper-51-attack/">Casper 51% Attack</a></li>
<li><a href="http://www.smallake.kr/wp-content/uploads/2016/06/314477721-Ethereum-Platform-Review-Opportunities-and-Challenges-for-Private-and-Consortium-Blockchains.pdf">Ethereum Platform Review Opportunities and Challenges for Private and Consortium Blockchains</a></li>
<li><a href="https://medium.com/@preethikasireddy/how-does-ethereum-work-anyway-22d1df506369">How Does Ethereum Work Anyway?</a></li>
<li><a href="https://etherworld.co/2020/01/09/early-eth1-eth2-switch-is-official/">Early Eth1&lt;-&gt;Eth2 Switch is official!</a></li>
</ul>
                
                  
                
              
              
                


              
            </article>
          </div>
        </div>
      </main>
      
        
<footer class="md-footer">
  
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-footer-copyright">
        
        <a href="https://etherscan.io/address/0xa19fcdad77c1f0fd184689aca88babcf68010347">Donate: 0xA19FCDaD77C1F0fd184689aca88BabCF68010347</a>
      </div>
      
        
  <div class="md-footer-social">
    <link rel="stylesheet" href="../../../assets/fonts/font-awesome.css">
    
      <a href="https://github.com/ethhub-io/ethhub" class="md-footer-social__link fa fa-github"></a>
    
      <a href="https://twitter.com/ethhub_io" class="md-footer-social__link fa fa-twitter"></a>
    
      <a href="https://medium.com/ethhub" class="md-footer-social__link fa fa-medium"></a>
    
      <a href="https://discordapp.com/invite/gw8AM98" class="md-footer-social__link fa fa-comment"></a>
    
      <a href="https://www.instagram.com/ethhub_io/" class="md-footer-social__link fa fa-instagram"></a>
    
  </div>

      
    </div>
  </div>
</footer>
      
    </div>
    
      <script src="../../../assets/javascripts/application.3a8f445d.js"></script>
      
      <script>app.initialize({version:"1.1.2",url:{base:"../../.."}})</script>
      
    
  </body>
</html>